<extend name="Public/base" />
<block name="head_css">
	<link rel="stylesheet" href="__SALE__/css/pay.css?v={:C('TKE_VERSION')}"/>
</block>
<block name="content">
  <div id="j-mask" class="u-mask f-hide" style="display: none;"></div>
    <div id="j-modal" class="u-modal f-hide" style="display: none;">
        <div class="u-modal-c">
            <a id="j-modal-close" class="close">X</a>
            <div class="info">
                <h1>请您在打开的页面上完成付款</h1>
                <h2>付款完成前请不要关闭窗口</h2>
                <h3>完成付款后请根据您的情况点击下方按钮</h3>
                <a class="btn-1 btn" href="{:U('/Customer/order')}">已完成付款</a>
                <a class="btn-2 btn" href="{:U('/Shop/pay',array('id'=>(int)I('get.id')))}">付款失败</a>                
            </div>
            <div class="icon">
                <img src="__SALE__/img/tips.jpg" />
            </div>
        </div>
    </div>
   
    <!-- 主体 -->
    <div class="g-bd mb20">
    	<notempty name="shop_order">
	    	
	        <div class="row row-1">
	            <h1>确认订单信息</h1>
	        </div>
	        <div class="row row-2">
	            <table>
	                <tr>
	                    <th style="text-align:left">商品名称</th>
	                    <th>单价(元)/单位</th>
	                    <th>数量</th>
	                    <th>总价(元)</th>
	                </tr>
	                <tr>
	                    <td style="text-align:left">
		                    {$shop_order.goods_name}
		                    <br/>
                      		<font>{$shop_order.goods_title}</font>
	                    </td>
	                    <td>
	                    	<if condition="$shop_order['goods_type']">
	                    		{$shop_order['promotion_price']|number_format=###,2}
	                    	<else/>
	                    		{$shop_order['shop_price']|number_format=###,2}
	                    	</if>/{$shop_order['goods_unit']}
	                    </td>
	                    <td>1</td>
	                    <td>
							<if condition="$shop_order['goods_type']">
	                    		{$shop_order['promotion_price']|number_format=###,2}
	                    	<else/>
	                    		{$shop_order['shop_price']|number_format=###,2}
	                    	</if>
						</td>
	                </tr>
	            </table>
	        </div>
	
	        <div class="row row-3">
	            <p>支付订金: <span>￥</span><a>{$shop_order.goods_deposit}元</a></p>
	        </div>
			<if condition="$pay_status">
		        <div class="row row-4">
		            <h1>支付方式</h1>
		            <input id="j-payment" type="hidden" name="payment" value="alipay" autocomplete="off"> 
		            <div class="payment">
		                <div class="u-checkbox u-checkbox-active" data-id="alipay">
		                    <div class="border">
		                        <div class="circle"></div>
		                    </div>
		                    <img class="img" src="__SALE__/img/alipay.png" alt=""></label>
		                </div>
		                <div class="u-checkbox" data-id="wechatpay">
		                    <div class="border">
		                        <div class="circle"></div>
		                    </div>
		                    <img class="img" src="__SALE__/img/weixin.png" alt=""></label>
		                </div>
		            </div>
		        </div>
		
		        <div class="row row-5">
		        	<div class="payment-msg">
		        		
	                </div>
		            <a id="j-btn-pay" class="btn-pay">立即付款</a>
		            <div class="clearfix"></div>
		        </div>
		        <div class="row row-5" style="font-size:15px;line-height:22px; margin-top:20px; margin-bottom:35px;color:red">
			        	请注意：请于
			        	<if condition = "C('ORDER_VALID_TIME') eq 0">
							45
						<else/>
	                		{:date('i',C('ORDER_VALID_TIME'))}
	                	</if>
	                	分钟内完成支付，否则本次交易将被取消。如果您已完成付款，且付款状态仍为“等待付款”，请不要再次付款。请允许我们的系统一些时间进行确认并更新状态。一旦我们收到您的付款以及完成订单处理后，我们将会以短信的方式通知您。
	        </div>
		    <else/>
		    	<p align="center" style="color:#ccc;font-size:16px;margin:30px 0px;">订单已经支付完成</p>
		    </if>
	    <else/>
	    	<p align="center" style="color:#ccc;font-size:16px;margin:30px 0px;">您没有可支付的订单</p>
        </notempty>
    </div>
</block>
<block name="foot_js">
	<link rel="stylesheet" href="__STATIC__/aui-artDialog-9fd667e/css/ui-dialog.css?v={:C('TKE_VERSION')}"/>
	<script type="text/javascript" src="__STATIC__/aui-artDialog-9fd667e/dist/dialog-min.js?v={:C('TKE_VERSION')}"></script>
	<script>
    	var url = "{:U('/Shop/payment')}";
    	var id = {:(int)I('get.id')};
    	var img_url = '__SALE__/img/';
	</script>
    <script src="__SALE__/js/pay.js"></script>
</block>
